package sdp;


import java.awt.image.BufferedImage;

import com.googlecode.javacv.CanvasFrame;

public class ImageViewer extends CanvasFrame {
	public ImageViewer() {
		super( "Video Feed" );
		setDefaultCloseOperation( DISPOSE_ON_CLOSE );
	}
	
	public void showImage( BufferedImage image ) {
		if( image.getWidth() != getWidth() || image.getHeight() != getHeight() )
			this.setSize(image.getWidth(), image.getHeight());
		super.showImage(image);
	}
}
